/* 主容器布局 */
.growth-container {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--background-color);
}

/* 左侧边栏样式 */
.sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-section, .action-section {
    margin-bottom: 2rem;
}

.filter-section h3, .action-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.filter-item {
    margin-bottom: 1rem;
}

.filter-item label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.filter-item select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
}

.btn-action {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border: none;
    border-radius: 6px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.btn-action:hover {
    background: var(--primary-dark);
}

/* 指标卡片网格 */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.metric-content h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.metric-trend {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.metric-trend.positive {
    color: var(--success-color);
}

.metric-trend.negative {
    color: var(--danger-color);
}

/* 图表区域样式 */
.charts-section {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-time {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-time:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-time.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 图表内容区域 */
.chart-content {
    position: relative;
}

.chart {
    height: 400px;
    width: 100%;
}

/* 图例样式 */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.color-dot.ndvi {
    background: #27ae60;
}

.color-dot.lai {
    background: #3498db;
}

.color-dot.height {
    background: #e67e22;
}

/* 图表工具提示样式 */
.echarts-tooltip {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #eee !important;
    border-radius: 4px;
    padding: 0.5rem !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .chart {
        height: 300px;
    }

    .btn-time {
        padding: 0.35rem 0.75rem;
        font-size: 0.85rem;
    }

    .chart-legend {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* 图表加载状态 */
.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.chart-loading i {
    font-size: 2rem;
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 右侧信息面板 */
.info-panel {
    padding: 1rem;
    background: #f8f9fa;
    border-left: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 面板卡片通用样式 */
.panel-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.panel-card h3 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 追肥建议样式 */
.advice-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.advice-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.advice-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.advice-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2ecc71;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.advice-text h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 0.95rem;
}

.advice-text p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 风险预警样式 */
.risk-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.risk-item {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    overflow: hidden;
    transition: all 0.3s ease;
}

.risk-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.risk-item.high {
    border-left: 4px solid #e74c3c;
}

.risk-item.medium {
    border-left: 4px solid #f39c12;
}

.risk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.risk-level {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.risk-item.high .risk-level {
    color: #fff;
    background: #e74c3c;
}

.risk-item.medium .risk-level {
    color: #fff;
    background: #f39c12;
}

.risk-time {
    font-size: 0.8rem;
    color: #888;
}

.risk-content {
    padding: 1rem;
}

.risk-content h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1rem;
}

.risk-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.risk-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.btn-text {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-text:hover {
    color: #2980b9;
    background: rgba(52, 152, 219, 0.1);
}

/* 警告徽章样式 */
.badge.warning {
    background: #f39c12;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 0;
    width: 500px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.close-btn {
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 提示框样式 */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #333;
    color: white;
    padding: 1rem 2rem;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 地图容器样式 */
.map-container {
    height: 400px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

/* 地块标签样式 */
.plot-label {
    background: none;
    border: none;
    box-shadow: none;
    font-size: 12px;
    color: #333;
    font-weight: bold;
    text-shadow: 1px 1px 2px white;
}

/* 热力图图例样式优化 */
.heatmap-legend {
    background: rgba(255, 255, 255, 0.9);
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.heatmap-legend h4 {
    font-size: 13px;
    margin-bottom: 10px;
    color: #444;
}

.legend-gradient {
    border-radius: 3px;
    overflow: hidden;
}

/* 风险预警按钮样式 */
.btn-text.mark-handled {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #27ae60;
    font-weight: 500;
}

.btn-text.mark-handled:hover {
    background: rgba(39, 174, 96, 0.1);
    color: #219a52;
}

.btn-text.mark-handled i {
    font-size: 0.9rem;
}

/* 风险处理动画 */
@keyframes handling {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.risk-item.handling {
    animation: handling 0.5s ease-out forwards;
}

/* 优化风险预警卡片的过渡效果 */
.risk-item {
    transition: all 0.3s ease, opacity 0.5s ease, transform 0.5s ease;
}